package com.tbit.uqbike.webmanager.dao.stat;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.tbit.config.datasource.DataSource;
import com.tbit.uqbike.object.pojo.MoneyData;
import com.tbit.uqbike.object.pojo.StatPark;
import com.tbit.uqbike.object.pojo.statistics.RideCardOrderDaySta;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

@DS(DataSource.STAT)
public interface RideCardOrderDayStaDao {
    int insert(RideCardOrderDaySta record);

    int insertSelective(RideCardOrderDaySta record);

    void insertBatch(@Param("entities") List<Map<String, Object>> rideCardS);

    List<RideCardOrderDaySta> queryByMap(Map<String, Object> params);

    void insertByMap(Map<String, Object> maps);

    List<MoneyData> groupByAccountId(Map<String, Object> map1);

    void update(RideCardOrderDaySta rideCardOrderDaySta);

    List<StatPark> statByType(Map<String, Object> params);

    RideCardOrderDaySta getRideMenberIncome(Map<String, Object> params);

    /**
     * 查询所有的骑行卡日统计记录
     */
    List<RideCardOrderDaySta> getRideCardNumDay(Map<String, Object> params);


    /**
     * 获取区域内骑行卡最早一天的数据量
     */
    Date getRideCardEarliestData(Integer accountId);

    /**
     * 批量删除骑行卡统计记录
     * @param accountIdList 区域id
     * @param st 开始时间
     * @param et 结束时间
     */
    void deleteById(@Param("List") List<Integer> accountIdList, @Param("st") String st, @Param("et") String et);
}